export default {
  'get|/mock/users': { // 拦截 /mock/users 的GET请求
    code: 200,
    'data|10': [{      // 生成10条数据
      id: '@id',
      name: '@cname',
      age: '@integer(20,30)'
    }]
  },
  'get|/mock/userInfo': {
    code: 200,
    data: {
      userId: '@id',
      username: '@cname',
      avatar: '@image',
      email: '@email',
      phone: '@string(11)',
      address: '@county(true)',
      createTime: '@date',
      updateTime: '@date',
    }
  },
  'post|/mock/register': { // 拦截 /mock/register 的POST请求
    code: 200,
    msg: '注册成功',
  },
  'post|/mock/login': { // 拦截 /mock/login 的POST请求
    code: 200,
    msg: '登录成功',
    data: {
      token: '@guid',
      userInfo: {
        userId: '@id',
        username: '@cname',
        avatar: '@image',
        email: '@email',
        phone: '@phone',
        address: '@county(true)',
        createTime: '@date',
        updateTime: '@date',
      }
    }
  },
  'post|/mock/registration': {
    code: 200,
    msg: '登记成功',
    data: {
      carName: '@csentence(5,15)',
    }
  },
}; 